<?php
//$cms = new Cms();
$pid = empty($_GET["type"]) ? empty($_GET["pid"]) ? -1 : $_GET["pid"] : $_GET["id"];
$menus = $cms->menus($pid, $_GET["id"]);
?>
<div class="container">
    <div class="tit">您的位置：<a href='/<?php echo $basepath ?>/'>主页</a> >
        <?php
        if (!empty($menus) && $cms->category["idMenuinfo"] !== $_GET["id"]) {
            ?>
            <a href='<?php
            $temp_name = $cms->menuUrlParse($cms->category["menuUrl"]);
            echo "/$basepath/" . $cms->is_html ? "html/$temp_name/$temp_name" . $cms->category["idMenuinfo"] : $cms->category["menuUrl"] . "?id=" . $cms->category["idMenuinfo"]; ?>'><?php echo $cms->category["menuName"]; ?></a> >
        <?php } ?>
        <a href='<?php echo $_SERVER["REQUEST_URI"] ?>'><?php echo $cms->current["menuName"] ?></a>
    </div>
    <div class="cf">
        <?php
        if (!empty($menus)) {
        ?>
        <div class="left_sider sider_wap">
            <div class="sider_tit"><?php echo $cms->category["menuName"]; ?> <img
                        src="/<?php echo $basepath ?>/assert/images/red_ico.png"
                        alt=""></div>
            <dl class="sider_dl2">
                <?php
                foreach ($menus as $value) {
                    ?>
                    <dd><a
                                style="<?php echo $_GET["id"] == $value->id_menuinfo ? "background:#d71634" : "" ?>"
                                href="<?php
                                $temp_name = $cms->menuUrlParse($value["menuUrl"]);
                                echo "/$basepath/" . ($cms->is_html ? "html/$temp_name/$temp_name" . $value["idMenuinfo"] . ".html" : $value["menuUrl"] . "?id=" . $value["idMenuinfo"] . "&pid=" . $value["parentId"]) ?>"
                                target="<?php echo $value["openType"]; ?>"
                                title="<?php echo $value["menuName"]; ?>"><?php echo $value["menuName"]; ?></a></dd>
                    <div class="s_two" style="display:block;"></div>
                <?php } ?>
            </dl>
        </div>
        <div class="rt_all">
            <?php } else{ ?>
            <div class="rt_all2">
                <?php } ?>
                <div class="all_tit"><span><?php echo $cms->current["menuName"] ?></span>
                    <p></p>
                </div>